#ifndef __APP_FILES_H__
#define __APP_FILES_H__

#ifdef __cplusplus
extern "C" {
#endif

ULONG AppFile_Read(IN SINT32 fd, INOUT void *data, IN SINT32 len);
ULONG AppFile_Write(IN SINT32 fd, IN void *data, IN SINT32 len);
ULONG AppFile_wrlock_nonblock(IN SINT32 fd);
ULONG AppFile_wrlock_block(IN SINT32 fd);
ULONG AppFile_rdlock_nonblock(IN SINT32 fd);
ULONG AppFile_rdlock_block(IN SINT32 fd);
ULONG AppFile_unlock(IN SINT32 fd);

ULONG AppFile_writeStr(IN const CHAR *pcFileName, IN const CHAR *pcValue);
ULONG AppFile_writeInt32(IN const CHAR *pcFileName, IN SINT32 s32Value);
ULONG AppFile_writeInt64(IN const CHAR *pcFileName, IN SINT64 s64Value);

ULONG AppFile_ReadStr(IN const CHAR *pcFileName, INOUT CHAR * pcValue, IN SINT32 s32Size);
ULONG AppFile_ReadInt32(IN const CHAR *pcFileName, INOUT SINT32 *ps32Value);
ULONG AppFile_ReadInt64(IN const CHAR *pcFileName, INOUT SINT64 *ps64Value);

#ifdef __cplusplus
}
#endif

#endif
